import { Button, Modal } from 'antd';
import React, { useState } from 'react';
import {useDispatch,useSelector} from "react-redux"
import * as action from "../action/index.js"
const Delmodel = (props) => {
    let store = useSelector((state)=>{
        return {
            ...state.tablereducer
        }
    })
    let dispatch = useDispatch()

 

  const handleOk = () => {
        dispatch(action.delfn(props.delIndex))
        props.fn(false)
  };

  const handleCancel = () => {
    props.fn(false)
  };

  return (
    <>
      <Modal title="Basic Modal" visible={props.send} onOk={handleOk} onCancel={handleCancel}>
        <p>您确定要删除吗?</p>
      </Modal>
    </>
  );
};

export default Delmodel;